package com.feicheng.iou.service.impl;

import com.feicheng.iou.entity.UserRole;
import com.feicheng.iou.mapper.UserRoleMapper;
import com.feicheng.iou.service.UserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tianchunlei
 * @since 2021-06-28
 */
@Service
@Slf4j
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {

    @Autowired
    private UserRoleMapper userRoleMapper;

    /**
     * @Author wuweinan
     * @Description 查询用户对应角色ID集合
     * @Date 2021-7-23 10:45
     * @param userId
     * @return  List<Integer>
     */
    @Override
    public List<Integer> selectRoleIds(Integer userId) {
        log.info("UserRoleServiceImpl的selectRoleIds方法进入，参数addUserPOJO：" + userId);
        return userRoleMapper.selectRoleIds(userId);
    }

}
